from tensorflow.keras.preprocessing import sequence

def demo1_zipfunc():
    a = [1, 2, 3]
    b = [4, 5, 6]
    c = [4, 5, 6, 7, 8]

    zipped = zip(a,b)
    print(zipped)
    print(list(zipped))

    print((list(zip(a,c))))

def demo02_test_ngram_set():
    input_list = [1,3,2,1,5,3]
    a = [input_list[i:] for i in range(2)]
    print(a)
    res = set(zip(*a))
    print(res)

def demo3_test_padding():
    x_train = [[1, 23, 5, 32, 55, 63, 2, 21, 78, 32, 23, 1],
               [2, 32, 1, 23, 1]]
    res = sequence.pad_sequences(sequences=x_train,maxlen=10,padding='post',truncating='post')
    print(res)

if __name__ == '__main__':
    demo3_test_padding()